import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import System from './static/work/System';

const routes: Array<RouteRecordRaw> = [
	{
		path: '/login',
		name: 'login',
		component: () => import('../views/global/Login.vue') /* 登录界面 */
	},
	{
		path: '/main',
		name: 'main',
		children: [
			// 系统管理
			...System
		],
		component: () => import('../views/global/Home.vue') /* 主页 */
	}
];

const router = createRouter({
	history: createWebHistory(process.env.BASE_URL),
	routes
});

export default router;
